feat(admin): add hotswappable engine package management#679
Open
0xClandestine wants to merge 2 commits intojundot:mainfrom
Open
feat(admin): add hotswappable engine package management#6790xClandestine wants to merge 2 commits intojundot:mainfrom
0xClandestine wants to merge 2 commits intojundot:mainfrom
Conversation
- Add backend API endpoints:
- GET /api/engine-packages/available - Fetch available versions from PyPI
- POST /api/engine-packages/install - Install/update a package
- GET /api/engine-packages/tasks - List install tasks
- DELETE /api/engine-packages/task/{task_id} - Delete completed task
- Add frontend UI:
- Engine versions card now clickable to open package manager modal
- Modal shows available versions from PyPI
- Install button with progress indicator and terminal output
- Warning about model reload after package update
- Backend implementation:
- Pydantic model EnginePackageInstallRequest
- EnginePackageInstallTask class for tracking installs
- Background installation using asyncio.to_thread
- Task polling with real-time status updates
Supported packages: mlx-lm, mlx-vlm, mlx-embeddings, mlx-audio
- Fix version sorting for mlx-audio dropdown (handles mixed version formats) - Fix engine info: only trust vcs_info for actual VCS installs (git+, etc) - Remove pyproject.toml fallback which caused stale commit SHAs to persist for PyPI-installed packages - Add delay + double loadStats() after install to ensure metadata refreshes
Author
6670575 to
6041883
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Add hotswappable engine package management to the admin panel, allowing users to install and update MLX engine packages (mlx-lm, mlx-vlm, mlx-embeddings, mlx-audio) directly from the UI.
Features
GET /api/engine-packages/available- Fetch available versions from PyPIPOST /api/engine-packages/install- Install/update a packageGET /api/engine-packages/tasks- List install tasks with real-time statusDELETE /api/engine-packages/task/{task_id}- Delete completed taskBug Fixes
'<' not supported between instances of 'str' and 'int') when sorting versions with mixed formatspyproject.tomlcommits for PyPI-installed packagesdirect_url.jsonparsing to only trustvcs_infofor actual VCS installs (git+,hg+, etc.)loadStats()after install to ensure metadata is properly refreshedTechnical Details
asyncio.to_threadpackaging.version.Versionfor proper semantic version sorting_load_fallback_commitsto_load_engine_commits_jsonto clarify scope (app bundle only)Files Changed
omlx/admin/routes.py: API endpoints + engine info fixesomlx/admin/static/js/dashboard.js: Frontend UI + install logicomlx/admin/templates/dashboard.html: Package manager modalomlx/admin/templates/dashboard/_status.html: Clickable engine versions card